package main

import (
	"github.com/google/wire"
	"jk-time/webook/feed/dao"
	"jk-time/webook/feed/events"
	"jk-time/webook/feed/grpc"
	"jk-time/webook/feed/ioc"
	"jk-time/webook/feed/repository"
	"jk-time/webook/feed/service"
)

func InitWebServer1() *App {
	wire.Build(
		ioc.InitDB,
		//ioc.InitRedis,
		dao.NewFeedPullEventDAO,
		dao.NewFeedPushEventDAO,
		repository.NewFeedRepository,

		service.NewFeedService,
		ioc.RegisterHandler,

		ioc.InitFollowClient,
		ioc.InitKafka,
		ioc.InitLogger,
		events.NewArticleEventConsumer,
		events.NewFeedEventConsumer,
		grpc.NewFeedEventGrpcSvc,
		ioc.NewConsumers,
		ioc.NewGrpcxServer,
		wire.Struct(new(App), "*"),
	)
	return new(App)
}
